package com.yonyou.cyxdms.sysAuth.service.dto;

import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.yonyou.cyxdms.framework.bean.dto.base.DMSBaseDTO;
import com.yonyou.cyx.framework.bean.entity.base.BasePO;
import java.io.Serializable;


/**
 * <p>
 * 系统固定代码
 * </p>
 *
 * @author quankk
 * @since 2019-07-05
 */

public class CodeDTO extends DMSBaseDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 代码ID
     */
        private Integer codeId;
        /**
     * 代码类型(取CODE_ID前4位)
     */
        private Integer type;
        /**
     * 类型名称
     */
        private String typeName;
        /**
     * 代码英文名称
     */
        private String codeEnDesc;
        /**
     * 代码中文名称
     */
        private String codeCnDesc;
        /**
     * 排序
     */
        private Integer num;
        /**
     * 状态(10011001有效,10011002无效)
     */
        private Integer status;
            private Boolean isDeleted;
    
    public CodeDTO() {
        super();
    }




    public Integer getCodeId() {
        return codeId;
    }


    public void setCodeId(Integer codeId) {
        this.codeId = codeId;
    }



    public Integer getType() {
        return type;
    }


    public void setType(Integer type) {
        this.type = type;
    }



    public String getTypeName() {
        return typeName;
    }


    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }



    public String getCodeEnDesc() {
        return codeEnDesc;
    }


    public void setCodeEnDesc(String codeEnDesc) {
        this.codeEnDesc = codeEnDesc;
    }



    public String getCodeCnDesc() {
        return codeCnDesc;
    }


    public void setCodeCnDesc(String codeCnDesc) {
        this.codeCnDesc = codeCnDesc;
    }



    public Integer getNum() {
        return num;
    }


    public void setNum(Integer num) {
        this.num = num;
    }



    public Integer getStatus() {
        return status;
    }


    public void setStatus(Integer status) {
        this.status = status;
    }



    public Boolean getDeleted() {
        return isDeleted;
    }


    public void setDeleted(Boolean isDeleted) {
        this.isDeleted = isDeleted;
    }



    @Override
    public String toString() {
        return "CodeDTO{" +
        "codeId=" + codeId +
        ", type=" + type +
        ", typeName=" + typeName +
        ", codeEnDesc=" + codeEnDesc +
        ", codeCnDesc=" + codeCnDesc +
        ", num=" + num +
        ", status=" + status +
        ", isDeleted=" + isDeleted +
        "}";
    }
    /**
     * 将DTO 转换为PO
     * //对某个对象属性进行赋值
     * //BeanMapperUtil.populateValueByMethod(transPO,"setXxx",this.getXxx);
     * @param poClass dto 需要转换的dto
     * @author quankk
     * @since 2018/7/22 0022
     */
    @Override
    public <T extends BasePO> T transDtoToPo(Class<T> poClass) {
        return super.transDtoToPo(poClass);
    }

    /**
     * 将DTO 转换为PO
     * BeanMapperUtil.populateValueByMethod(transPO,"setXxx",this.getXxx);
     * @param po 需要转换的对象
     * @author quankk
     * @since 2018/7/22 0022
     */
    public <T extends BasePO> void transDtoToPo(T po) {
        BeanMapperUtil.copyProperties(this, po, "codeId");
    }

}
